package top.linuyx.enums;

import lombok.Data;

/**
 * @Author Linuyx
 * @Description 全局状态码枚举类
 * @Date Created in 2021-04-08 15:35
 */

public enum ResponseEnum {

    /**
     * 全局状态码
     */
    SYSTEM_ERROR(100,"服务器错误"),
    AUTHENTICATE_ERROR(101,"请登录后再尝试访问"),
    AUTHORIZE_ERROR(102,"未经授权,无法访问"),
    PARAM_ERROR(103,"参数校验错误");

    /**
     * 状态码
     */
    private Integer code;

    /**
     * 状态描述
     */
    private String message;

    ResponseEnum(Integer code, String message){
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
